package cn.dnf.org.domain;

import cn.dnf.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 部门
 */
@Data
public class Department extends BaseDomain {

    // 编号
    private String sn;
    // 名称
    private String name;

    private String dirPath;
    // 状态
    private Integer state;

    // 部门领导id  (employee)
    private Long manager_id;

    // employee对象  领导  manager_id
    private Employee manager;

    // 上级部门id
    private Long parent_id;
    private Department parent;

    // private List<Employee> list = new ArrayList<>();

    // 子集部门
    //部门树最后一级没有数据就不显示
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    List<Department> children = new ArrayList<>();

}
